<%--
  Created by IntelliJ IDEA.
  User: WFB
  Date: 2021/6/23
  Time: 19:51
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>图片列表</title>
    <style>
        table {
            border-collapse: collapse;
        }

        tr, td, th {
            border: 1px solid;
            min-width: 150px;
            text-align: center;
        }

        img {
            width: auto;
            height: auto;
            max-width: 200px;
            max-height: 150px;
        }
    </style>
</head>
<body>
<table>
    <tr>
        <td colspan="4">
            <a href="add.jsp">添加</a>
        </td>
    </tr>
    <tr>
        <th>图片预览</th>
        <th>描述</th>
        <th>上传日期</th>
        <th>操作</th>
    </tr>
    <c:forEach items="${list}" var="var">
        <tr>
            <td style="background: aliceblue">
                <a href="${var.icon}">
                    <img src="${var.icon}">
                </a>
            </td>
            <td>${var.description}</td>
            <td>${var.uploadTime}</td>
            <td>
                <a href="remove?id=${var.id}">删除</a>
                <a href="download?id=${var.id}">下载</a>
            </td>
        </tr>
    </c:forEach>
</table>
</body>
</html>
